<template>
    <view>
        <block v-if="score.length != 0">
            <view class="integral" v-for="(item, index) in score" :key="index">
                <view class="integral-left">
                    <image mode="aspectFit" :src="url + item.good_img"></image>
                    <view class="integral-left1">
                        <view>{{ item.good_name }}</view>
                        <view>{{ item.time }}</view>
                    </view>
                </view>

                <view class="integral-right">
                    <text style="color: #f44444">
                        -{{ item.integral }}
                        <text class="integral-right1">分</text>
                    </text>
                </view>
            </view>
            <view class="mygd">没有更多了哦~</view>
        </block>
        <view class="list_imgbk2" v-if="score.length == 0">
            <image class="list_imgbk" mode="aspectFit" src="https://yunkeososyunchuc.bc8t.cn/ymq_canyino2o/static/list.png"></image>
            <view class="list_imgbk3">您暂时还没有兑换记录哦！</view>
        </view>
    </view>
</template>

<script>
import cardlist from '@/ymq_canyino2o/dist/cardlist/index';
import gettel from '@/ymq_canyino2o/dist/gettel/index';
var app = getApp();
export default {
    components: {
        cardlist,
        gettel
    },
    data() {
        return {
            score: '',
            url: ''
        };
    },
    onLoad: function (n) {
        uni.hideShareMenu({});
        app.globalData.setNavigationBarColor(this);
        var that = this;
        var t = uni.getStorageSync('users').id;
        uni.getStorageSync('url');
        app.globalData.util.request({
            url: 'entry/wxapp/Dhmx',
            cachetime: '0',
            data: {
                user_id: t
            },
            success: function (n) {
                console.log(n);
                that.setData({
                    score: n.data,
                    url: ''
                });
            }
        });
    },
    onReady: function () {},
    onShow: function () {},
    onHide: function () {},
    onUnload: function () {},
    onPullDownRefresh: function () {},
    onReachBottom: function () {},
    onShareAppMessage: function () {},
    methods: {}
};
</script>
<style>
@import './record.css';
</style>
